package com.cpi.cornpp.common.files.dto;

public class SAPComponentCornCostDTO implements SAPComponentDTO {
	private static final long serialVersionUID = 6129098484950817939L;
	private int year;
	private int month;
	private String plant;
	private String rawMaterial;
	private String currency;
	private double amount;
	public int getYear() {
		return year;
	}
	public void setYear(int year) {
		this.year = year;
	}
	public int getMonth() {
		return month;
	}
	public void setMonth(int month) {
		this.month = month;
	}
	public String getPlant() {
		return plant;
	}
	public void setPlant(String plant) {
		this.plant = plant;
	}
	public String getRawMaterial() {
		return rawMaterial;
	}
	public void setRawMaterial(String rawMaterial) {
		this.rawMaterial = rawMaterial;
	}
	public double getAmount() {
		return amount;
	}
	public void setAmount(double amount) {
		this.amount = amount;
	}
	public void setCurrency(String currency) {
		this.currency = currency;
	}
	public String getCurrency() {
		return currency;
	}
	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	public boolean equals(Object object) {
		boolean equal = false;
		SAPComponentCornCostDTO sapComponentCornCostDTO = null;
		if( this == object ){
			equal = true;
		}else{
			if( this instanceof SAPComponentCornCostDTO ){
				sapComponentCornCostDTO = (SAPComponentCornCostDTO)object;
				if( this.hashCode() == sapComponentCornCostDTO.hashCode() ){
					equal = true;
				}
			}
		}
		return equal;
	}
	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode(){
		int hash = 0;
		hash = new Integer(this.year).hashCode();
		hash += new Integer(this.month).hashCode(); 
		hash += new Double(this.amount).hashCode();
		hash += ( this.plant != null ? this.plant.hashCode() : 0 );
		hash += ( this.rawMaterial !=null ?  this.rawMaterial.hashCode() : 0 );
		hash += ( this.currency != null ? this.currency.hashCode() : 0 );
		return hash;
	}
	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		StringBuffer toStringValue = null;
		toStringValue = new StringBuffer(0);
		toStringValue.append(getClass().getName());
		toStringValue.append(STRING_COLON);
		toStringValue.append(this.year);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.month);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.plant);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.rawMaterial);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.currency);
		toStringValue.append(STRING_COMMA);
		toStringValue.append(this.amount);
		return toStringValue.toString();
	}
}